import FrameConfig from "@/model/frame/FrameConfig";

export interface ISystemState {
  token: string;
  isLogin: boolean;
  username: string;
}

export class SystemState implements ISystemState {
  isLogin = false;
  token = "";
  username = "";

  constructor() {
    const _token = localStorage.getItem(FrameConfig.APP_TOKEN_NAME);
    if (_token) {
      this.isLogin = true;
      this.token = _token;
    }
  }
}
